package org.example;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        JDKProxy jdkProxy = new JDKProxy();
        Vehicle vehicle = (Vehicle) jdkProxy.getInstance(new Car());
        vehicle.running();


        Vehicle2 vehicle2 = (Vehicle2) jdkProxy.getInstance(new Bus());
        vehicle2.running2();
    }
}
